//
//  MeCenterItemTableViewCell.m
//  Ev_Master
//
//  Created by Evan on 2019/6/11.
//  Copyright © 2019 Evan. All rights reserved.
//

#import "MeCenterItemTableViewCell.h"

@implementation MeCenterItemTableViewCell

+ (instancetype)cellWithTableView:(UITableView *)tableView  IndexPath:(NSIndexPath *)indexPath{
    NSString *Service = [NSString stringWithFormat:@"MeCenterItemTableViewCell_%ld_%ld",indexPath.section,indexPath.row];
    MeCenterItemTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:Service];
    if (cell == nil) {
        [ tableView registerNib:[UINib nibWithNibName:@"MeCenterItemTableViewCell" bundle:nil] forCellReuseIdentifier:Service];
        cell = [tableView dequeueReusableCellWithIdentifier:Service];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        
    }
    return cell;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
//    self.blockCenter(0);
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

-(void)setHomeUI{
    [self.btnIcon1 setBackgroundImage:[UIImage imageNamed:@"btnIconH1"] forState:UIControlStateNormal];
    [self.btnIcon2 setBackgroundImage:[UIImage imageNamed:@"btnIconH2"] forState:UIControlStateNormal];
    [self.btnIcon3 setBackgroundImage:[UIImage imageNamed:@"btnIconH3"] forState:UIControlStateNormal];
    [self.btnIcon4 setBackgroundImage:[UIImage imageNamed:@"btnIconH4"] forState:UIControlStateNormal];
    [self.btnIcon5 setBackgroundImage:[UIImage imageNamed:@"btnIconH5"] forState:UIControlStateNormal];
    [self.btnIcon6 setBackgroundImage:[UIImage imageNamed:@"btnIconH6"] forState:UIControlStateNormal];
    [self.btnIcon7 setBackgroundImage:[UIImage imageNamed:@"btnIconH7"] forState:UIControlStateNormal];
    [self.btnIcon8 setBackgroundImage:[UIImage imageNamed:@"btnIconH8"] forState:UIControlStateNormal];
    
    self.btnIcon1.frame = CGRectMake(0, 0, 50, 50);
    
    self.labelIcon1.font = [UIFont systemFontOfSize:15];
    self.labelIcon1.text = @"充值";
    self.labelIcon2.text = @"还款";
    self.labelIcon3.text = @"查询";
    self.labelIcon4.text = @"提货";
    self.labelIcon5.text = @"卖出";
    self.labelIcon6.text = @"买入";
    self.labelIcon7.text = @"存货";
    self.labelIcon8.text = @"撤单";
}



- (IBAction)btnIconClick:(UIButton*)sender {
    NSInteger btnIndex = sender.tag;
    self.blockBtnClick(btnIndex);
}


@end
